package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the charge_money database table.
 * 
 */
@Entity
@Table(name="charge_money")
@NamedQuery(name="ChargeMoney.findAll", query="SELECT c FROM ChargeMoney c")
public class ChargeMoney implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="chargemoney_id")
	private int chargemoneyId;

	@Column(name="chargemoney_allmoney")
	private BigDecimal chargemoneyAllmoney;

	@Column(name="chargemoney_name")
	private String chargemoneyName;

	@Column(name="chargemoney_people")
	private String chargemoneyPeople;

	@Column(name="chargemoney_time")
	private Timestamp chargemoneyTime;

	@Column(name="chargemoney_type")
	private int chargemoneyType;

	//bi-directional many-to-one association to LookIllness
	@ManyToOne
	@JoinColumn(name="lookillness_id")
	private LookIllness lookIllness;

	//bi-directional many-to-one association to ChargemoneyDetail
	@OneToMany(mappedBy="chargeMoney")
	private List<ChargemoneyDetail> chargemoneyDetails;

	public ChargeMoney() {
	}

	public int getChargemoneyId() {
		return this.chargemoneyId;
	}

	public void setChargemoneyId(int chargemoneyId) {
		this.chargemoneyId = chargemoneyId;
	}

	public BigDecimal getChargemoneyAllmoney() {
		return this.chargemoneyAllmoney;
	}

	public void setChargemoneyAllmoney(BigDecimal chargemoneyAllmoney) {
		this.chargemoneyAllmoney = chargemoneyAllmoney;
	}

	public String getChargemoneyName() {
		return this.chargemoneyName;
	}

	public void setChargemoneyName(String chargemoneyName) {
		this.chargemoneyName = chargemoneyName;
	}

	public String getChargemoneyPeople() {
		return this.chargemoneyPeople;
	}

	public void setChargemoneyPeople(String chargemoneyPeople) {
		this.chargemoneyPeople = chargemoneyPeople;
	}

	public Timestamp getChargemoneyTime() {
		return this.chargemoneyTime;
	}

	public void setChargemoneyTime(Timestamp chargemoneyTime) {
		this.chargemoneyTime = chargemoneyTime;
	}

	public int getChargemoneyType() {
		return this.chargemoneyType;
	}

	public void setChargemoneyType(int chargemoneyType) {
		this.chargemoneyType = chargemoneyType;
	}

	public LookIllness getLookIllness() {
		return this.lookIllness;
	}

	public void setLookIllness(LookIllness lookIllness) {
		this.lookIllness = lookIllness;
	}

	public List<ChargemoneyDetail> getChargemoneyDetails() {
		return this.chargemoneyDetails;
	}

	public void setChargemoneyDetails(List<ChargemoneyDetail> chargemoneyDetails) {
		this.chargemoneyDetails = chargemoneyDetails;
	}

	public ChargemoneyDetail addChargemoneyDetail(ChargemoneyDetail chargemoneyDetail) {
		getChargemoneyDetails().add(chargemoneyDetail);
		chargemoneyDetail.setChargeMoney(this);

		return chargemoneyDetail;
	}

	public ChargemoneyDetail removeChargemoneyDetail(ChargemoneyDetail chargemoneyDetail) {
		getChargemoneyDetails().remove(chargemoneyDetail);
		chargemoneyDetail.setChargeMoney(null);

		return chargemoneyDetail;
	}

}